package com.gjm.demo.controller;

import com.gjm.demo.aspect.MyAspect;
import lombok.extern.slf4j.Slf4j;
import org.springframework.jmx.export.annotation.ManagedResource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/user")
public class UserController {

    @MyAspect //记录方法运行时间
    @RequestMapping("/test")
    public void test() {
        int num = 0;
        for (int i = 0; i < 100000; i++) {
            num++;
        }
    }
}
